import { createStore } from "vuex";
import { user } from "./modules/user";
import { tags } from "./modules/tags";
export default createStore({
  state: {},
  //更改vuex的store中状态的唯一的方法- 同步操作,外部用commit调用
  getters: {},
  mutations: {},
  //负责业务代码及异步请求,外部用dispatch调用,调用mutations修改state
  actions: {},
  modules: {
    //子vuex模块注册
    user,
    tags,
  },
});
